package com.wpp.rabbitmq.a_simple;

import com.wpp.ProducerApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author wpp25
 * @date 2019/11/19 20:23
 * @description：
 *    第一种情况 ： 测试简单模式
 */
@SpringBootTest(classes = ProducerApplication.class)
@RunWith(SpringRunner.class)
public class A_TestSimple {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @Test
    public void testSimpleSend() {
        rabbitTemplate.convertAndSend("01_simple_queue","你好呀，小兔子");
    }
}
